import React, { memo } from 'react'
import type { ReactNode } from 'react'
import { SectionHeaderV2Wrapper } from './style'
interface IProps {
  children?: ReactNode
  title: string
  more?: string
  morePath?: string
}

const SectionHeaderV2: React.FC<IProps> = (props) => {
  const { title, more, morePath } = props
  return (
    <SectionHeaderV2Wrapper>
      <h3 className="title">{title}</h3>
      {more && morePath && (
        <a className="more" href={morePath}>
          {more} &gt;
        </a>
      )}
    </SectionHeaderV2Wrapper>
  )
}

export default memo(SectionHeaderV2)
